import 'package:base_flutter/base_flutter.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:ls_work/viewmodel/service_order/service_order_rating_view_model.dart';

class ServiceOrderRatingPage extends BaseStatefulMvvmWidget{
  final String id;


  ServiceOrderRatingPage(this.id);

  @override
  State<StatefulWidget> createState() => _ServiceOrderRatingState();

}

class _ServiceOrderRatingState extends BaseMvvmState<ServiceOrderRatingViewModel,ServiceOrderRatingPage>{
  @override
  Widget buildLoadingContentView() {
    return ListView(
      padding: EdgeInsets.symmetric(horizontal: 16),
      children: viewModel.contentWidget(),
    );
  }

  @override
  Widget buildRootView(BuildContext context, Widget loadingContentWidget) {
    return Scaffold(
      appBar: AppBar(
        title: Text("服务评价"),
      ),
      body: loadingContentWidget,
    );
  }

  @override
  ServiceOrderRatingViewModel createViewModel() {
    return ServiceOrderRatingViewModel(context,widget.id);
  }

  @override
  void onRetryClick() {
    // TODO: implement onRetryClick
  }

}